package com.corona.game;

import com.corona.Game;
import com.corona.game.action.DrawAction;
import com.corona.game.util.GameProfiler;
import java.util.Iterator;

/* compiled from: PkmnMap.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/DrawPokemonLowers.class */
public class DrawPokemonLowers extends DrawAction {
    public Action.Layer layer = Action.Layer.map_130;

    public DrawPokemonLowers(GameProfiler profiler) {
        super(profiler);
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.action.DrawAction
    protected void draw(Game game) {
        if (!game.player.dontDrawMapDuringBattle) {
            Iterator<Pokemon> it = game.map.onscreenPokemon.iterator();
            while (it.hasNext()) {
                Pokemon pokemon = it.next();
                if (pokemon.drawLower != null) {
                    pokemon.drawLower.draw(game);
                }
            }
            if (!(game.player.hmPokemon == null || game.player.hmPokemon.drawLower == null)) {
                game.player.hmPokemon.drawLower.draw(game);
            }
            game.player.drawPlayerLower.step(game);
        }
    }
}
